package com.ruoyi.syf.controller;

import com.ruoyi.syf.service.IRiskCheckDangerService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;

/**
 * 排查隐患
 *
 * @author yr
 * @date 2024-08-03
 */
@RestController
@RequestMapping("/syf/danger")
public class RiskCheckDangerController extends BaseController
{
    @Autowired
    private IRiskCheckDangerService riskCheckDangerService;

    /**
     * 删除排查隐患
     */
    @PreAuthorize("@ss.hasPermi('syf:danger:remove')")
    @Log(title = "排查隐患", businessType = BusinessType.DELETE)
	@DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(riskCheckDangerService.deleteRiskCheckDangerByIds(ids));
    }
}
